; Lingsha

; Constants -------------------------

[Constants]
global $active = 0
global $creditinfo = 0


global persist $swapvar = 0
global persist $face = 0
global persist $shirt = 0
global persist $skirt = 0
global persist $bra = 0
global persist $tan = 0
global persist $thong = 0
global persist $kok = 0
global persist $piercings = 0
global persist $naked = 0
global persist $blazer = 0
global persist $garter = 0
global persist $tail = 0
global persist $top = 0
global persist $alt = 0
global persist $glasses = 0

[KeyBlazer]
condition = $active == 1
key = no_ctrl no_Shift alt 9
type = cycle
$blazer = 0,1

[KeyGarter]
condition = $active == 1
key = ctrl no_Shift No_alt 9
type = cycle
$garter = 0,1

[KeyTail]
condition = $active == 1
key = no_ctrl no_Shift alt 8
type = cycle
$tail = 0,1

[KeyAlt]
condition = $active == 1
key = no_ctrl no_Shift No_alt 9
type = cycle
$alt = 0,1

[KeyShirt]
condition = $active == 1
key = ctrl no_Shift No_alt 6
type = cycle
$shirt = 0,1

[KeySkirt]
condition = $active == 1
key = ctrl no_Shift No_alt 7
type = cycle
$skirt = 0,1

[KeyBra]
condition = $active == 1
key = no_ctrl no_Shift alt 6
type = cycle
$bra = 0,1

[KeyThong]
condition = $active == 1
key = no_ctrl no_Shift alt 7
type = cycle
$thong = 0,1

[KeyFace]
condition = $active == 1
key = no_ctrl no_Shift No_alt 6
type = cycle
$face = 0,1

[KeyTan]
condition = $active == 1
key = no_ctrl no_Shift No_alt 7
type = cycle
$tan = 0,1,2

[KeyPiercings]
condition = $active == 1
key = no_ctrl no_Shift No_alt 8
type = cycle
$piercings = 0,1

[KeyTop]
condition = $active == 1
key = ctrl no_Shift No_alt 8
type = cycle
$top = 0,1

[KeyKok]
condition = $active == 1
key = VK_DOWN
type = cycle
$kok = 0,1

[KeySwap]
condition = $active == 1
key = VK_UP
type = cycle
$swapvar = 0,1

[KeyNaked]
condition = $active == 1
key = alt no_ctrl h
type = cycle
$naked = 0,1


[Present]
post $active = 0
run = CommandListCreditInfo

; Overrides -------------------------

[TextureOverrideLingshaHairPosition]
hash = c207a096
handling = skip
vb0 = ResourceLingshaHairPosition
vb2 = ResourceLingshaHairBlend
draw = 4755,0
$active = 1

[TextureOverrideLingshaHairTexcoord]
hash = a0b75ad6
vb1 = ResourceLingshaHairTexcoord

[TextureOverrideLingshaHairVertexLimitRaise]
hash = bbe8b08e
; override_vertex_count = 4755
; override_byte_stride = 80

[TextureOverrideLingshaBodyPosition]
hash = 27fca779
handling = skip
vb0 = ResourceLingshaBodyPosition
vb2 = ResourceLingshaBodyBlend
draw = 173854,0
$active = 1

[TextureOverrideLingshaBodyTexcoord]
hash = 319a30e4
vb1 = ResourceLingshaBodyTexcoord

[TextureOverrideLingshaBodyVertexLimitRaise]
hash = 940b1b19
; override_vertex_count = 0
; override_byte_stride = 92

[TextureOverrideLingshaFacePosition]
hash = e779f220
handling = skip
vb0 = ResourceLingshaFacePosition
vb2 = ResourceLingshaFaceBlend
draw = 2836,0
$active = 1

[TextureOverrideLingshaFaceTexcoord]
hash = f314db9c
vb1 = ResourceLingshaFaceTexcoord

[TextureOverrideLingshaFaceVertexLimitRaise]
hash = 3b530692
; override_vertex_count = 52
; override_byte_stride = 80

[TextureOverrideLingshaHairIB]
hash = 49b55fac
handling = skip

[TextureOverrideLingshaHairA]
hash = 49b55fac
match_first_index = 0
ib = ResourceLingshaHairAIB
; LingshaHairA-vb0=c207a096.txt.001 (0)
drawindexed = 0, 0, 0
; LingshaHairA
	; Hair Thicc+ (4755)
	drawindexed = 18030, 0, 0

[TextureOverrideLingshaHairADiffuse]
hash = 40f36f97
this = ResourceLingshaHairADiffuse

[TextureOverrideLingshaHairALightMap]
hash = 44527967
this = ResourceLingshaHairALightMap

[TextureOverrideLingshaBodyIB]
hash = 6dca71bc
handling = skip

[TextureOverrideLingshaBodyA]
hash = 6dca71bc
match_first_index = 0
ib = ResourceLingshaBodyAIB
; LingshaBodyA empty (0)
drawindexed = 0, 0, 0
; LingshaBodyA 
	; Lingsha Fit BARE cropped (69649)
if $shirt == 0 && $naked == 0
	drawindexed = 281544, 116283, 0
endif
	; Lingsha Fit BARE.001 (72546)
if $shirt == 1 || $naked == 1
	drawindexed = 292890, 397827, 0
endif
	; Gyaru Accs (7246)
	drawindexed = 28008, 21240, 0
	; Gyaru Accs.002 (3948)
	drawindexed = 11097, 49248, 0
if $naked == 0

	; Gyaru Shirt Thicc+ (9945)
if $shirt == 0
	drawindexed = 39978, 60345, 0
endif
	; JK Skirt Thicc+ (4081)
if $skirt == 0
	drawindexed = 15960, 100323, 0
endif
	; Thong Thicc+ (1699)
if $thong == 0
	drawindexed = 6276, 690717, 0
endif
	; Bra Thicc+ (4740)
if $bra == 0
	drawindexed = 21240, 0, 0
endif
;run = CustomShaderTransparency
endif

;[CustomShaderTransparency]
;blend = ADD BLEND_FACTOR INV_BLEND_FACTOR
;blend_factor[0] = 0.85
;blend_factor[1] = 0.85
;blend_factor[2] = 0.85
;blend_factor[3] = 1
;handling = skip
;drawindexed = auto


[ResourceTan]
filename = LingshaTan.dds

[ResourceFaceTan]
filename = LingshaFaceTan.dds

[TextureOverrideLingshaBodyADiffuse]
hash = c9a3badc
if $tan == 0
this = ResourceLingshaBodyADiffuse
else
this = ResourceTan
endif

[TextureOverrideLingshaBodyALightMap]
hash = 1d85d63f
this = ResourceLingshaBodyALightMap

[TextureOverrideLingshaBodyB]
hash = 6dca71bc
match_first_index = 5739
ib = null
; LingshaBodyB empty (0)
drawindexed = 0, 0, 0

[TextureOverrideLingshaFaceIB]
hash = a016d09a
handling = skip
drawindexed = auto

[TextureOverrideLingshaFaceA]
hash = a016d09a
match_first_index = 0
ib = ResourceLingshaFaceAIB

[TextureOverrideLingshaFaceADiffuse]
hash = c8749360
if $tan == 0
this = ResourceLingshaFaceADiffuse
else
this = ResourceFaceTan
endif

[TextureOverrideLingshaFaceB]
hash = a016d09a
match_first_index = 12048
ib = ResourceLingshaFaceBIB

; CommandList -----------------------

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
    pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
    pre run = CustomShader\ShaderFixes\help.ini\FormatText
    pre $\ShaderFixes\help.ini\notification_timeout = time + 5.0
    $creditinfo = 1
endif

; Resources -------------------------



[ResourceLingshaHairPosition]
type = Buffer
stride = 40
filename = LingshaHairPosition.buf

[ResourceLingshaHairBlend]
type = Buffer
stride = 32
filename = LingshaHairBlend.buf

[ResourceLingshaHairTexcoord]
type = Buffer
stride = 8
filename = LingshaHairTexcoord.buf

[ResourceLingshaBodyPosition]
type = Buffer
stride = 40
filename = LingshaBodyPosition.buf

[ResourceLingshaBodyBlend]
type = Buffer
stride = 32
filename = LingshaBodyBlend.buf

[ResourceLingshaBodyTexcoord]
type = Buffer
stride = 20
filename = LingshaBodyTexcoord.buf

[ResourceLingshaFacePosition]
type = Buffer
stride = 40
filename = LingshaFacePosition.buf

[ResourceLingshaFaceBlend]
type = Buffer
stride = 32
filename = LingshaFaceBlend.buf

[ResourceLingshaFaceTexcoord]
type = Buffer
stride = 8
filename = LingshaFaceTexcoord.buf

[ResourceLingshaHairAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LingshaHairA.ib

[ResourceLingshaBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LingshaBodyA.ib

[ResourceLingshaBodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LingshaBodyB.ib

[ResourceLingshaFaceAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LingshaFaceA.ib

[ResourceLingshaFaceBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = LingshaFaceB.ib

[ResourceLingshaHairADiffuse]
filename = LingshaHairADiffuse.dds

[ResourceLingshaHairALightMap]
filename = LingshaHairALightMap.dds

[ResourceLingshaBodyADiffuse]
filename = LingshaBodyADiffuse.dds

[ResourceLingshaBodyALightMap]
filename = LingshaBodyALightMap.dds

[ResourceLingshaFaceADiffuse]
filename = LingshaFaceADiffuse.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by Levi, check out more mods at Patreon.com/LeviMods"

; .ini generated by XXMI (XX-Model-Importer)
; If you have any issues or find any bugs, please open a ticket at https://github.com/leotorrez/XXMI-Tools/issues